/*
var nodemailer = require('nodemailer');

var transporter = nodemailer.createTransport({
    service: 'SendCloud',
    auth: {
        user: 'wephoto@9prE0DzMJdUDQWmGYQNmtNu5rhs1qXsi.sendcloud.org',
        pass: 'wephotocool000'
    }
});
*/
/*
var wellknown = require('nodemailer-wellknown');
var config = wellknown('163');
config.auth = {
    user: 'wephoto_weproduct@163.com',
    pass: 'wephotocool'
}

// create reusable transporter object using SMTP transport
//var transporter = nodemailer.createTransport(config);
*/
/*
// NB! No need to recreate the transporter object. You can use
// the same transporter object for all e-mails

// setup e-mail data with unicode symbols
var mailOptions = {
    to: 'beeleelee@outlook.com', // sender address
    from: 'wephoto_weproduct@163.com', // list of receivers
    subject: 'wephoto test email', // Subject line
    html: '<b>Hello world!</b>' // html body
};

// send mail with defined transport object
transporter.sendMail(mailOptions, function(error, info){
    if(error){
        console.log(error);
    }else{
        console.log('Message sent: ' + info.response);
    }
    transporter.close();
});
*/
// using SendGrid's Node.js Library - https://github.com/sendgrid/sendgrid-nodejs
//var sendgrid = require("sendgrid")('wephoto', 'gbuRQxe236cO');
var sendgrid = require("sendgrid")('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');
var email = new sendgrid.Email();

email.addTo("lifeng@xish.com");
email.setFrom("beeleelee@outlook.com");
email.setSubject("Sending with SendGrid is Fun");
email.setHtml("<h1>hello there!</h1>");

sendgrid.send(email);
